package com.tianruan.dc.modules.userinfo.mapper;

import com.tianruan.dc.modules.sys.user.entity.db.UserRoleDO;
import com.tianruan.dc.modules.sys.user.entity.dto.UserDTO;
import com.tianruan.dc.modules.userinfo.entity.User;
import org.apache.ibatis.annotations.Select;

import java.util.List;


public interface UserInfoMapper {


    void insertUser(User user);

    @Select("select * from t_sys_user_info where id=#{id}")
    User findUser(String id);

    void updateUser(User user);
//    void updateProject(Project project);

    void setDelFlag(UserDTO id);

//    void insertBatch(List<Project> projectList);

    void setTeaRole(UserRoleDO userRoleDO);

    void setStuRole(UserRoleDO userRoleDO);
    @Select("select * from t_sys_user where id=#{id}")
    String check(String id);

    void save(User user);

//    void updateRoleId(String type, String userId);

    @Select("select id from t_sys_user where t_sys_user.id=#{id}")
    String checkUserRoleId(String id);

    List<User> pageTea(String name, String post,String college,String phone, String major,  String email
                              );
    List<User> pageStu(String name, String officeId, String major, String enrollmentYear, String email,
                       String phone);



    void insertSysUser(User user);

}
